﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/AdminMaster.master" AutoEventWireup="true" CodeFile="CandidateCalendarView.aspx.cs" Inherits="Assessor_CandidateCalendarView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script type="text/javascript">
        function fn_ProcessAssessorSelection(obj) {
            var varSelValue = $(obj)[0].children[0].checked;
            $('[id^=ContentPlaceHolder1_gvCandidateSelectAssessordate_chkCandidateFirstHalf_]').prop("checked", false);
            $('[id^=ContentPlaceHolder1_gvCandidateSelectAssessordate_chkCandidateSecondHalf_]').prop("checked", false);
            $(obj)[0].children[0].checked = varSelValue;
            if (varSelValue == true) {
                var varVal = $(obj).attr("time").split(':');
                document.getElementById("ctl00_ContentPlaceHolder1_ddlHour").value = varVal[0];
                document.getElementById("ctl00_ContentPlaceHolder1_ddlMinute").value = varVal[1];
                document.getElementById("ctl00_ContentPlaceHolder1_ddlAMPM").value = varVal[2];

            }
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width: 95%; margin-top: 10px; margin-left: 25px;" id="tblGroupDiscussion" cellspacing="1" cellpadding="1" border="0">
                                                        <tbody>

                                                            <tr>
                                                                <td align="right" colspan="3" style="height: 10px; text-align: left">
                                                                    <div class="templeteheder">
                                                                        <h2>Candidate Group Discussion + Interviews Date</h2>
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                           
                                                            <tr>
                                                                <td align="right" style="width: 35%;">&nbsp;</td>
                                                                <td class="auto-style3">&nbsp;</td>
                                                                <td style="width: 64%;">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td align="right" style="width: 35%;">Candidate&nbsp;</td>
                                                                <td class="auto-style3">
                                                                    &nbsp;&nbsp;:&nbsp;&nbsp;</td>
                                                                <td style="width: 64%;"><asp:Label ID="CandidateName" runat="server" Text=""></asp:Label>&nbsp;<asp:Label ID="CandidateId" runat="server" Visible="False"></asp:Label>&nbsp;<asp:Label ID="CandidateBriefId" runat="server" Visible="False"></asp:Label>&nbsp;<asp:Label ID="UserId" runat="server" Visible="False"></asp:Label>&nbsp;<asp:Label ID="BriefId" runat="server" Visible="False"></asp:Label>&nbsp;<asp:Label ID="StatusId" runat="server" Visible="False"></asp:Label>&nbsp;
                                                                    <asp:HiddenField ID="hdnCandidateGDID" EnableViewState="true" runat="server" />
                                                                     <asp:HiddenField runat="server" ID="hdnPartnerID" />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3" align="center">
                                                                    <asp:CustomValidator ID="cstAssessorDate" Display="Dynamic" runat="server" ValidationGroup="SaveGDDetail" ForeColor="red" ErrorMessage="Select Atleast One Time" OnServerValidate="cstAssessorDate_ServerValidate"></asp:CustomValidator></td>
                                                            </tr>
                                                            <tr>
                                                                <td align="right" style="width: 35%;">Assessment + Moderation Time&nbsp;<font color="red">*</font></td>
                                                                <td>&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                                                                <td style="width: 64%;">

                                                                    <asp:DropDownList runat="server" ID="ddlHour" Width="55px" ClientIDMode="AutoID">
                                                                        <asp:ListItem Text="01" Value="01"></asp:ListItem>
                                                                        <asp:ListItem Text="02" Value="02"></asp:ListItem>
                                                                        <asp:ListItem Text="03" Value="03"></asp:ListItem>
                                                                        <asp:ListItem Text="04" Value="04"></asp:ListItem>
                                                                        <asp:ListItem Text="05" Value="05"></asp:ListItem>
                                                                        <asp:ListItem Text="06" Value="06"></asp:ListItem>
                                                                        <asp:ListItem Text="07" Value="07"></asp:ListItem>
                                                                        <asp:ListItem Text="08" Value="08"></asp:ListItem>
                                                                        <asp:ListItem Text="09" Value="09"></asp:ListItem>
                                                                        <asp:ListItem Text="10" Value="10" Selected="True"></asp:ListItem>
                                                                        <asp:ListItem Text="11" Value="11"></asp:ListItem>
                                                                        <asp:ListItem Text="12" Value="12"></asp:ListItem>
                                                                    </asp:DropDownList>Hr. &nbsp;
                                                
                                                                    <asp:DropDownList runat="server" ID="ddlMinute" Width="55px" ClientIDMode="AutoID">
                                                                        <asp:ListItem Text="00" Value="00" Selected="True"></asp:ListItem>
                                                                        <asp:ListItem Text="05" Value="05"></asp:ListItem>
                                                                        <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                                                        <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                                                        <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                                                        <asp:ListItem Text="25" Value="25"></asp:ListItem>
                                                                        <asp:ListItem Text="30" Value="30"></asp:ListItem>
                                                                        <asp:ListItem Text="35" Value="35"></asp:ListItem>
                                                                        <asp:ListItem Text="40" Value="40"></asp:ListItem>
                                                                        <asp:ListItem Text="45" Value="45"></asp:ListItem>
                                                                        <asp:ListItem Text="50" Value="50"></asp:ListItem>
                                                                        <asp:ListItem Text="55" Value="55"></asp:ListItem>
                                                                    </asp:DropDownList>Mins. &nbsp; 

                                                                    <asp:DropDownList runat="server" ID="ddlAMPM" Width="70px" ClientIDMode="AutoID">
                                                                        <asp:ListItem Text="AM" Value="AM" Selected="True"></asp:ListItem>
                                                                        <asp:ListItem Text="PM" Value="PM"></asp:ListItem>

                                                                    </asp:DropDownList>&nbsp; 

                                                                    <asp:CustomValidator ID="cstGDCandidateTime" Display="Dynamic" runat="server" ValidationGroup="SaveGDDetail" ForeColor="red" ErrorMessage="Select Time As Per Assessor Availability" OnServerValidate="cstGDCandidateTime_ServerValidate"></asp:CustomValidator></td>
                                                            </tr>
                                                            <tr>
                                                                <td align="right" style="width: 35%;">&nbsp;</td>
                                                                <td class="auto-style3">&nbsp;</td>
                                                                <td style="width: 64%;">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3" style="text-align: center; font-size: 20px;">
                                                                    <b>Please check one or both session for any one date</b>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3">
                                                                    <asp:GridView ID="gvCandidateSelectAssessordate" runat="server" Width="95%" AutoGenerateColumns="False"
                                                                        OnRowDataBound="gvCandidateSelectAssessordate_RowDataBound" AllowPaging="True" OnPageIndexChanging="gvCandidateSelectAssessordate_PageIndexChanging"
                                                                        EmptyDataText="Assessor - Availability Calender is empty">
                                                                        <Columns>
                                                                            <asp:BoundField DataField="GDDate" HeaderText="&nbsp;Assessment Date">
                                                                                <ItemStyle HorizontalAlign="Left" Width="20%" />
                                                                                <HeaderStyle HorizontalAlign="Left" />
                                                                            </asp:BoundField>
                                                                            <asp:BoundField DataField="GDDayRemark" HeaderText="Location" />
                                                                            <asp:TemplateField Visible="false">
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblAssessorCalendarDetailID" runat="server" Text=""></asp:Label>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField>
                                                                                <HeaderTemplate>
                                                                                    &nbsp;&nbsp;First half (AM)
                                                                                </HeaderTemplate>
                                                                                <ItemTemplate>
                                                                                    <table>
                                                                                        <tr>
                                                                                            <td>
                                                                                                <asp:CheckBox type="checkbox" runat="server" ID="chkApproveFirstHalf" CssClass="first" EnableViewState="true" onclick="checkAll(this,'I','first');" /></td>
                                                                                            <td>
                                                                                                <asp:Label ID="lblFHHour" runat="server" Text="" ClientIDMode="AutoID" Style="color: black;"></asp:Label>&nbsp;Hr. &nbsp;
                                                                        <asp:Label ID="lblFHMinute" runat="server" Text="" ClientIDMode="AutoID" Style="color: black;"></asp:Label>&nbsp;Mins. &nbsp; AM
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>


                                                                                </ItemTemplate>
                                                                                <ItemStyle Width="30%" />
                                                                            </asp:TemplateField>



                                                                            <asp:TemplateField>
                                                                                <HeaderTemplate>
                                                                                    &nbsp;&nbsp;Candidate
                                                                                </HeaderTemplate>
                                                                                <ItemTemplate>
                                                                                    <asp:CheckBox ID="chkCandidateFirstHalf" runat="server" CssClass="second" EnableViewState="true" onchange="fn_ProcessAssessorSelection(this);" />
                                                                                </ItemTemplate>
                                                                                <ItemStyle HorizontalAlign="Center" />
                                                                            </asp:TemplateField>



                                                                            <asp:TemplateField>
                                                                                <HeaderTemplate>
                                                                                    &nbsp;&nbsp;Second half (PM)
                                                                                </HeaderTemplate>
                                                                                <ItemTemplate>
                                                                                    <table>
                                                                                        <td>
                                                                                            <asp:CheckBox type="checkbox" runat="server" ID="chkApproveSecondHalf" CssClass="second" EnableViewState="true" onclick="checkAll(this,'I','second');" /></td>
                                                                                        <td>
                                                                                            <asp:Label ID="lblSHHour" runat="server" Text="" ClientIDMode="AutoID" Style="color: black;"></asp:Label>&nbsp;Hr. &nbsp;
                                                                                            <asp:Label ID="lblSHMinute" runat="server" Text="" ClientIDMode="AutoID" Style="color: black;"></asp:Label>&nbsp;Mins. &nbsp; PM
                                                                                        </td>
                                                                                    </table>


                                                                                </ItemTemplate>
                                                                                <ItemStyle Width="30%" />
                                                                            </asp:TemplateField>

                                                                            <asp:TemplateField>
                                                                                <HeaderTemplate>
                                                                                    &nbsp;&nbsp;Candidate
                                                                                </HeaderTemplate>
                                                                                <ItemTemplate>
                                                                                    <asp:CheckBox ID="chkCandidateSecondHalf" runat="server" CssClass="second" EnableViewState="true" onchange="fn_ProcessAssessorSelection(this);" />
                                                                                </ItemTemplate>
                                                                                <ItemStyle HorizontalAlign="Center" />
                                                                            </asp:TemplateField>

                                                                        </Columns>
                                                                        <EmptyDataTemplate>
                                                                            <asp:Label ID="lblEmptydata" runat="server" Text="Assessor - Availability Calender is empty" ForeColor="White"></asp:Label>
                                                                        </EmptyDataTemplate>
                                                                        <FooterStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                                                                        <PagerStyle BackColor="#E2DED6" ForeColor="blue" HorizontalAlign="Center" />
                                                                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                                        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                                                                        <EditRowStyle BackColor="#CCCCCC" />
                                                                        <EmptyDataRowStyle BackColor="Black" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                                                                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                                    </asp:GridView>
                                                                    <br />

                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3">The first hour will be private session.<br />
                                                                    The second hour will be assessment + moderation.<br />
                                                                    The third hour is group discussion.
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="right" style="width: 35%;">&nbsp;</td>
                                                                <td class="auto-style3">&nbsp;</td>
                                                                <td style="width: 64%;">&nbsp;</td>
                                                            </tr>

                                                            <tr runat="server" id="vButton">
                                                                <td></td>
                                                                <td></td>
                                                                <td>
                                                                    <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" ValidationGroup="SaveGDDetail" />&nbsp;&nbsp;&nbsp;&nbsp;
                                                                    <asp:Button ID="btnBack" runat="server" Text="Back" OnClick="btnBack_Click" />&nbsp;&nbsp;<asp:CustomValidator ID="cstGDPartnerValidation" runat="server" Display="Dynamic" ForeColor="red" OnServerValidate="cstGDPartnerValidation_ServerValidate" ValidationGroup="SaveGDDetail"></asp:CustomValidator>
                                                                    <asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="right" style="width: 35%;">&nbsp;</td>
                                                                <td class="auto-style3">&nbsp;</td>
                                                                <td style="width: 64%;">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td align="right" colspan="3" style="height: 10px; text-align: left">
                                                                    <div class="templeteheder">
                                                                        <h3>Cancelled Group Discussion + Interviews Date</h3>
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                             <tr>
                                                                <td align="right" colspan="3" style="height: 10px; text-align: center">
                                                                    <asp:GridView ID="gvCandidateOldGD" runat="server" AutoGenerateColumns="False">
                                                                        <Columns>
                                                                            <asp:BoundField DataField="GDDate" HeaderText="Date" />
                                                                            <asp:BoundField DataField="GDLocation" HeaderText="Location" Visible="False" />
                                                                            <asp:CheckBoxField DataField="FirstHalfCheck" HeaderText="FirstHalf" />
                                                                            <asp:CheckBoxField DataField="SecondHalfCheck" HeaderText="SecondHalf" />
                                                                            <asp:BoundField DataField="GDCandidateTime" HeaderText="CandidateTime" />
                                                                            <asp:BoundField DataField="EntryDate" HeaderText="EntryDate" />
                                                                            <asp:BoundField DataField="UserName" HeaderText="UserName" />
                                                                        </Columns>
                                                                    </asp:GridView>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="right" style="width: 35%;">&nbsp;</td>
                                                                <td class="auto-style3">&nbsp;</td>
                                                                <td style="width: 64%;">&nbsp;</td>
                                                            </tr>
                                                            </tbody>
        </table>
</asp:Content>

